import React, { useEffect } from 'react';
import './Restegr.scss'
import { LockOutlined, UserOutlined } from '@ant-design/icons';
import { Button, notification, Form, Input, Cascader } from 'antd';
import { user_list } from '../../api/index'
import { useNavigate } from 'react-router-dom';
import { arrayBuffer } from 'stream/consumers';
interface props {

}

interface Option {
  value: string | number;
  label: string;
  children?: Option[];
}
function Restegr(props: props) {
  //查询数据
  useEffect(() => {

  }, [])
  // 实例化路由对象
  var navigate = useNavigate();
  const onFinish = (values: any) => {
    console.log('Received values of form: ', values);

  };
  const options: Option[] = [
    {
      value: '0-1',
      label: '事项管理员',
    },
    {
      value: '0-2',
      label: '反馈管理员',
    },
    {
      value: '0-3',
      label: '信息发布管理员',
    },
  ];
  // 选择身份回调
  const onChange = (value: any) => {
    console.log(value);
  };
  return (
    <div className='small'>
      <div className='small-header'>
        政府服务管理页面
      </div>
      <div className='form'>
        <span className='aa'>注册页面</span>
        <Form
          name="normal_login"
          className="login-form"
          initialValues={{ remember: true }}
          onFinish={onFinish}
        >
          <Form.Item
            name="username"
            rules={[{ required: true, message: '请输入你的账号' }]}
          >
            <Input prefix={<UserOutlined className="site-form-item-icon" />} placeholder="输入用户名" />
          </Form.Item>
          <Form.Item
            name="password"
            rules={[{ required: true, message: '请输入你的密码' }]}
          >
            <Input
              prefix={<LockOutlined className="site-form-item-icon" />}
              type="password"
              placeholder="输入密码"
            />
          </Form.Item>
          <div className='dddl'>
            <Cascader options={options} onChange={onChange} placeholder="选择身份" />
          </div>
          <Form.Item>
            <Button type="primary" htmlType="submit" className="login-form-button">
              注册
            </Button>
          </Form.Item>
        </Form>

      </div>

    </div>
  );
}

export default Restegr;